import { MockMethod } from "vite-plugin-mock";

const mock: Array<MockMethod> = [
  {
    // 接口路径
    url: "/dev-api/api/v1/users/me",

    // 接口方法
    method: "get",

    // 返回数据
    response: () => {
      return {
        code: "00000",
        data: {
          userId: 2,
          nickname: "管理员(Mock)",
          avatar:
            "https://oss.youlai.tech/youlai-boot/2023/05/16/811270ef31f548af9cffc026dfc3777b.gif",
          roles: ["ADMIN"],
          perms: [
            "sys:menu:delete",
            "sys:dept:edit",
            "sys:dict_type:add",
            "sys:dict:edit",
            "sys:dict:delete",
            "sys:dict_type:edit",
            "sys:menu:add",
            "sys:user:add",
            "sys:role:edit",
            "sys:dept:delete",
            "sys:user:edit",
            "sys:user:delete",
            "sys:user:reset_pwd",
            "sys:dept:add",
            "sys:role:delete",
            "sys:dict_type:delete",
            "sys:menu:edit",
            "sys:dict:add",
            "act:festival:add",
            "act:festival:edit",
            "act:festival:delete",
          ],
        },
        msg: "ok",
      };
    },
  },
];

export default mock;
